#include "openmove_Prefix.h"

OMTimer :: OMTimer(void)
{
	m_pTimer = PlatformManager::getSingleton().createTimer();
	reset();
}

OMTimer :: ~OMTimer(void)
{
	PlatformManager::getSingleton().destroyTimer(m_pTimer);
}

Real OMTimer :: getMilliseconds(void)
{
	return m_StartTime + m_pTimer->getMillisecondsCPU();
}

Real OMTimer :: getSeconds(void)
{
	return (getMilliseconds() / 1000.0f);
}

void OMTimer :: reset(void)
{
	m_pTimer->reset();
	m_StartTime = 0.0f;
}

void OMTimer :: setTime(Real const val)
{
	m_pTimer->reset();
	m_StartTime = val;
}
